//
//  ZhuanTTableViewCell.m
//  LT
//
//  Created by dllo on 16/5/21.
//  Copyright © 2016年 dllo. All rights reserved.
//

#import "ZhuanTTableViewCell.h"
#import "UIImageView+WebCache.h"
@implementation ZhuanTTableViewCell

-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        [self createSubViews];
    }
    return self;
}

-(void)createSubViews{
    
    self.photoImage = [[UIImageView alloc]init];
    self.photoImage.backgroundColor = [UIColor yellowColor];
    [self.contentView addSubview:self.photoImage];
    
}

-(void)layoutSubviews{
    [super layoutSubviews];
    self.photoImage.frame = CGRectMake(10 * WIDTHCELL , 10 * WIDTHCELL, (self.contentView.frame.size.width - 20) * WIDTHCELL, 180 * WIDTHCELL);
    
    
}



-(void)setCellModel:(ZhuanTModel *)cellModel{
    
    _cellModel = cellModel; //最关键的一步
 
    [self.photoImage sd_setImageWithURL:[NSURL URLWithString:_cellModel.photo]];
    
    
}






- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
